/* @group Blocks */

.block {
  background: white;
  padding: @borderRadiusLarge;
  border: 1px solid darken(@wellBackground, 7%);
  .border-radius(@borderRadiusLarge);
  .content {
    padding: 4px 0px;
  }
  .icon {
    margin-right: 5px;
  }
  .moodle-actionmenu[data-enhanced].show .menu a:hover {
    text-decoration: none;
    &:before {
      color: #fff;
    }
  }
  .moodle-core-dragdrop-draghandle {
    &:before {
      font-family: 'FontAwesome';
      content: "\f047";
      margin-right: 5px;
      cursor: move;
    }
    img {
      display: none;
    }
  }
  li.item_with_icon > p img {
    position: static !important;
    margin-right: 5px;
  }
}

.editing {
  .block-region.yui3-dd-drop-active-valid {
    border: 1px dashed darken(@wellBackground, 7%);
    .border-radius(@borderRadiusLarge);
  }

  #page-footer {
    .footerblocks > .span4,
    .block-region.yui3-dd-drop-active-valid {
      min-height: 300px;
    }
  }
}

#middle-blocks {
  margin: 15px 0px;
}

p.tree_item.leaf a {
  > i {
    width: 14px;
  }
  &.action-delete {
    > i {
      color: red;
    }
  }
}

.tree_item.branch {
  background-image: none !important;

  &:before {
    font-family: FontAwesome;
    content: "\f07c";
    margin-right: 5px;
  }
  &.emptybranch:before {
    font-family: FontAwesome;
    content: "\f114";
    margin-right: 5px;
  }
  img.smallicon.navicon {
    display: none;
  }
}

.block_navigation.block {
  li.type_user > .tree_item.branch:before {
    content: "\f007";
  }

  li.type_unknown.depth_1 > .tree_item.branch:before {
    content: "\f015";
  }
}

.collapsed .tree_item.branch:before {
  font-family: FontAwesome;
  /*@replace: "\f053"*/content: "\f07b";
  margin-right: 5px;
}

.hidden-blocks {
  background: #ffe1e1;
  padding: 10px;
  border: 1px solid #EEE;
  border-radius: 5px;
  margin: 10px 0px 10px 0px;

  h4 {
    text-align: left;
    padding-bottom: 8px;
    margin-bottom: 8px;
    border-bottom: 1px solid #ccc;
    margin-top: 0px;
    color: #ff6666;
  }

  .block {
    float: right;
    width: 250px;
    margin-left: 10px;
  }
}

.block .header .title h2,
.block h3.main {
  font-size: 1.15em;
  line-height: 26px;
  margin-bottom: 5px;
  text-transform: uppercase;
  font-weight: normal;
  padding: 0px;
}

.block .header .title {
  border-bottom: 1px solid #EEE;
  padding-left: 0px;

  h2:before {
    font-family: FontAwesome;
    font-size: 1.65em;
    margin-right: .3em;
    content: "\f0c9";
  }
}

.block_iconic_html .header .title h2:before {
  padding-right: 0px;
  content: none;
}
.block.block_iconic_html .header .title h2 span.fa {
  padding-right: 0px !important;
  &:before {
    margin-right: .3em;
    font-size: 1.65em;
  }
}

.block.hidden .header .title h2,
.block.hidden h3.main,
.block.hidden .header .title {
  border-bottom: none;
  margin-bottom: 0px;
}

.block_quiz_results {
  text-align: left;
}

.block_rss_client {
  .description {
    height: auto;
    padding-bottom: 0px;
    margin-bottom: 0px;
  }
  .content {
    padding: 0px;
    a:hover {
      text-decoration: none;
    }
    li {
      border-bottom: 1px dotted #E1E1E1;
      padding: 5px;
      &:hover {
        background: #f9f9f9;
      }
    }
  }
  .header .title h2:before {
    content: "\f09e";
  }
  .footer {
    text-align: right;
    padding-top: 5px;
    a {
      color: #fff;
      width: 100px;
      padding: 4px 12px;
      font-size: 1em;
      border-radius: 5px;
      &:hover {
        color: #fff;
      }
    }
  }
}

/* @group Calendar Block */
.block .minicalendar {
    th, td {
        word-break: break-word;
    }
}
/* @end */

/* @group Logged in User Block */
.block_myprofile {
  .content {
    padding: 5px;
    text-align: center;
    min-height: 80px;
    img.profilepicture {
      width: 70px;
      height: 70px;
      padding: 3px;
      margin-bottom: 5px;
      float: left;
    }
  }
}

/* @end */

/* @group Login Block */

.block_login {
  .header .title h2:before {
    content: "\f007";
    font-family: FontAwesome;
    float: left;
  }
  .content {
    .footer {
      height: 60px;
      width: 100%;
      padding: 0px;
      div {
        float: left;
        clear: left;
        margin: 0;
        width: 90%;
        a {
          background: darkslategray;
          &:hover {
            background: red;
          }
        }
      }
      a {
        color: #fff;
        padding: 0;
        float: left;
        margin: 0;
        font-size: 1em;
        white-space: nowrap;
      }
    }
    form input[type="submit"],
    .footer a {
      background-image: none;
      border-color: #30ADD1;
      border-image: none;
      border-radius: 4px;
      border-style: solid;
      border-width: 1px;
      box-shadow: none;
      color: #fff;
      cursor: pointer;
      display: inline-block;
      font-size: 13px;
      line-height: 20px;
      padding: 4px 12px;
      text-align: center;
      text-shadow: none;
      vertical-align: middle;
      margin: 10px 0;
      width: 100%;
    }
    form input[type="submit"]:hover,
    .footer a:hover {
      text-decoration: none;
      background: green;
    }
  }
  input#login_username,
  input#login_password {
    width: 95%;
  }
  .username label:before {
    content: "\f007";
    font-family: FontAwesome;
    margin-right: 5px;
  }
  .password label:before {
    content: "\f084";
    font-family: FontAwesome;
    margin-right: 5px;
  }
}

/* @end */

/* @group Footer blocks - copied from Shoelace */

.footer-fluid-span (@columns, @fluidGridColumnWidth, @fluidGridGutterWidth) {
    width: (@fluidGridColumnWidth * @columns) + (@fluidGridGutterWidth * (@columns - 1));
    *width: (@fluidGridColumnWidth * @columns) + (@fluidGridGutterWidth * (@columns - 1)) - (.5 / @gridRowWidth * 100 * 1%);
}

aside.footer-edit .block {
    .footer-fluid-span(3, @fluidGridColumnWidth, @fluidGridGutterWidth);
    display: block;
    float: left;
    min-height: 240px;
    max-height: 240px;
    overflow-y: scroll;
    margin-left: @fluidGridGutterWidth;
    .box-sizing(border-box);
}

// MDL-44074.
@media (min-width: 768px) and (max-width: 979px) {
    aside.footer-edit .block {
        .footer-fluid-span(3, @fluidGridColumnWidth768, @fluidGridGutterWidth768);
        margin-left: @fluidGridGutterWidth768;
    }
}

@media (min-width: 1200px) {
    aside.footer-edit .block {
        .footer-fluid-span(3, @fluidGridColumnWidth1200, @fluidGridGutterWidth1200);
        margin-left: @fluidGridGutterWidth1200;
    }
}

// Eliminates need for 'desktop-first-column' but does not work in IE8.
// Info on: http://www.w3schools.com/cssref/sel_first-of-type.asp
aside.footer-blocks div.row-fluid div.block:first-of-type {
    margin-left: 0px;
}

// Support multiple rows when editing otherwise above works, see: http://www.w3schools.com/cssref/sel_nth-of-type.asp
.footer-nth(@index) {
    aside.footer-edit div.block:nth-of-type(@{index}) {
        margin-left: 0px;
    }
}

.footer-nthX (@index) when (@index > 0) {
    .footer-nth(@index);
    .footer-nthX(@index - 4);
}

.footer-nthX(37); // Ten rows.

/* @end */


/* @end */